package net.zjitc.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import net.zjitc.entity.Carouse;
import net.zjitc.mapper.CarouseMapper;
import net.zjitc.service.ICarouseService;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

/**
 * @auther 郭梦婷
 * @create 2022-05-02 11:59:58
 * @describe 服务实现类
 */
@Service
@Transactional
public class CarouseServiceImpl extends ServiceImpl<CarouseMapper, Carouse> implements ICarouseService {
    @Autowired
    private CarouseMapper carouseMapper;

    @Override
    public Page<Carouse> getcarouse(Integer pagenum, Integer pagesize) {
        Page<Carouse> page=new Page<>(pagenum,pagesize);
        page = carouseMapper.selectPage(page,null);

        return page;
    }

    @Override
    public int deleteById(int id) {
        int i = carouseMapper.deleteById(id);
        return i;
    }
}
